package com.future.hedongjun.mall.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.future.baselib.utils.GlideUtils;
import com.future.hedongjun.R;
import com.future.hedongjun.mall.bean.EvaluateBean;

import java.util.List;

/**
 * @author jniu
 * @Email niuxiaoqi@hztianque.com
 * @time 2018/11/19
 */
public class EvaluateAdapter extends BaseQuickAdapter<EvaluateBean, BaseViewHolder> {
    public EvaluateAdapter(@Nullable List<EvaluateBean> data) {
        super(R.layout.recycler_item_evaluate, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, EvaluateBean item) {
        helper.setText(R.id.tv_name, item.name);
        helper.setText(R.id.tv_time, item.time);
        helper.setText(R.id.tv_content, item.content);
        GlideUtils.loadImage(mContext, item.imgUrl, (ImageView) helper.getView(R.id.iv_icon));
    }
}
